﻿@using KPIS.GERP.Models.ICM
@model MasContact

@{
    ViewBag.Title = "ข้อมูล ผู้ขาย";
    ViewBag.Descr = "ข้อมูลประวัติผู้ขาย";
    ViewBag.SubTitle = "ข้อมูลประวัติผู้ขาย";
    Layout = ViewBag.Layout;
    bool noLayout = ViewBag.NoLayout == true;
}

<div class="block-button-menu-above">
    @Html.ActionLink("กลับไปหน้าแสดงข้อมูลทั้งหมด", "Index", new { category = Model.ConCategory, noLayout = noLayout }
            , new { @class="btn btn-small btn-gray button-standard-width", role="button" })
    @Html.ButtonEdit(new { id = Model.ConId, noLayout = noLayout })
    @Html.ActionLink("เพิ่ม", "Create", new { category = Model.ConCategory, noLayout = noLayout }
                , new { @class="btn btn-small btn-success button-standard-width", role="button" })
    @Html.ButtonDelete(new { id = Model.ConId, noLayout = noLayout })
</div>
    
@Html.Partial("_DetailsForm")

<div class="widget-box  collapsed">
	<div class="widget-header header-color-blue2">
        <div class="widget-toolbar">
            <a href="#" data-action="collapse" style="font-size:large;" ><i class="icon-chevron-up"></i>  ข้อมูลบัญชีเงินฝากธนาคาร</a>
		</div>
    </div>
    <div class="widget-body" style="padding:10px;">
        <div class="widget-main">
            <iframe id="iframe1" src="@Url.Action("IndexBank", "MasContact")?ConId=@Model.ConId" frameborder="0" style="width:100%;" ></iframe>
        </div>
    </div>
</div>
<div class="widget-box collapsed">
	<div class="widget-header header-color-blue2">
        <div class="widget-toolbar">
            <a href="#" data-action="collapse" style="font-size:large;" ><i class="icon-chevron-up"></i>  ข้อมูลผู้ถือหุ้น</a>
		</div>
    </div>
    <div class="widget-body" style="padding:10px;">
        <div class="widget-main">
            <iframe id="iframe2" src="@Url.Action("IndexPartner", "MasContact")?ConId=@Model.ConId" frameborder="0" style="width:100%;" ></iframe>
        </div>
    </div>
</div>


@section scripts
{
    <script>

        var lastHeight1 = 0, curHeight1 = 0, $frame1 = $('#iframe1');
        setInterval(function () {
            curHeight1 = $frame1.contents().find('body').height() + 40;
            if (curHeight1 != lastHeight1) {
                $frame1.css('height', (lastHeight1 = curHeight1) + 'px');
            }
        }, 500);

        var lastHeight2 = 0, curHeight2 = 0, $frame2 = $('#iframe2');
        setInterval(function () {
            curHeight2 = $frame2.contents().find('body').height() + 40;
            if (curHeight2 != lastHeight2) {
                $frame2.css('height', (lastHeight2 = curHeight2) + 'px');
            }
        }, 500);

    </script>
}